/*
Copyright (C) 2003 Michael Würtinger

This file is part of Dynamicengine.

Dynamicengine is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

Dynamicengine is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Dynamicengine. If not, see http://www.gnu.org/licenses/.
*/


#include "include.h"
#include "main.h"
#include "keyboard.h"

void keyboard(unsigned char key, int x, int y)
{
	switch(key)
	{
	case 27:
		app_exit(0);
		break;
	case 13:
	{
		static bool bFullScreen = true;

		if(bFullScreen)
		{
			glutReshapeWindow(800, 600);
			glutInitWindowPosition(100, 100);
			//ShowCursor(true);
			bFullScreen = false;
		}
		else
		{
			glutFullScreen();
			//ShowCursor(false);
			bFullScreen = true;
		}
		break;
	}
	case 'r':
	case 'R':
		restart();
		break;
	}
}
